public class Test {
    public static void main(String[] args) {
        BinaryTree BinaryTree = new BinaryTree();
        BinaryTree.TreeNode root = BinaryTree.createTree();
        System.out.println("====");
        BinaryTree.preOrder(root);
        System.out.println();
        BinaryTree.inOrder(root);
        System.out.println();
        BinaryTree.postOrder(root);
        System.out.println();
        System.out.println("====");

        System.out.println("节点个数： "+BinaryTree.size(root));
        BinaryTree.size2(root);

        System.out.println("节点个数2： "+BinaryTree.usesize);

        System.out.println("叶子结点："+BinaryTree.getLeafNodeCount(root));

        System.out.println("第k层个数："+BinaryTree.getKLevelNodeCount(root,3));

        System.out.println("二叉树的高度:"+BinaryTree.getHeight(root));

        BinaryTree.TreeNode ret=BinaryTree.find(root,'E');
        System.out.println("查找："+ret.val);

        System.out.println(BinaryTree.isCompleteTree(root));
    }
}
